package com.graduationdesign.zengyan.graduationdesignapp.dataLayer;

import com.graduationdesign.zengyan.graduationdesignapp.dataLayer.model.User;

/**
 * Created by ZengYan on 2018/5/12.
 *
 * @desc :
 */
public class AccountManager {


    private static AccountManager instance = null;

    private User currentUser ;

    private AccountManager() {
    }

    public synchronized static AccountManager getInstance() {
        if (instance == null) {//懒汉式
            instance = new AccountManager();
        }
        return instance;
    }

    public void setCurrentUser(User currentUser) {
        this.currentUser = currentUser;
    }

    public String getCurrentStuNum() {
//        return currentUser.getStudentNum();
//        return "201430098034";
        return currentUser.getStudentNum();
    }

    public String getAvatarUrl() {
        return currentUser.getAvatarUrl();
    }



}
